From: Marco Trevisan (TreviƱo) Date: Thu, 23 Aug 2018 16:14:38 +0000 (+0200) Subject: search: Cancel search provider operations on clear X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~929^2^2~59 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c47a740c834d39a69cf0a828ade25738d8ab92ce;p=gnome-shell.git search: Cancel search provider operations on clear Ensure that the search provider operations (just getResultMetas requests in the current implementation) in progress are properly cancelled when we clear the UI, otherwise returned results might still be added when not needed. This is triggered for each provider by the SearchResults reset. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/205 --- diff --git a/js/ui/search.js b/js/ui/search.js index 1fb54b4c9..804be9593 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -192,6 +192,7 @@ var SearchResultsBase = new Lang.Class({ }, clear() { + this._cancellable.cancel(); for (let resultId in this._resultDisplays) this._resultDisplays[resultId].actor.destroy(); this._resultDisplays = {};